package com.cv.system.api.token;

import com.cv.framework.security.core.utils.JwtUtil;
import com.cv.system.api.token.form.LoginUser;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.stereotype.Service;

/**
 * 令牌 API 接口实现类
 *
 * @author Charles_XDXD
 */
@Service
@DubboService
public class TokenApiServiceImpl implements TokenApi {

    @Override
    public boolean validateToken(String token) {
        return JwtUtil.validateToken(token);
    }

    @Override
    public LoginUser getLoginUser(String token) {
        return JwtUtil.parseToken(token);
    }

}
